$(function () 
{
    // 2018-08 跳出框架至顶层
    if (window.top !== window.self) {
		console.log("跳出框架！");
        window.top.location.href = window.self.location.href;
    }

    // 2018-08 回退登陆页面后,禁止再前进
    if (window.location.href.indexOf("/login") > -1) {
        history.pushState(null, null, document.URL);
        window.addEventListener('popstate', function () {
            history.pushState(null, null, document.URL);
        });
    };

    // 2018-08 清空本地cookie
    var keys = document.cookie.match(/[^ =;]+(?=\=)/g);
    if (keys) {
        for (var i = 0; i < keys.length; i++) {
            document.cookie = keys[i] + "=0;path=/;expires=" + new Date(-1).toUTCString();
        }
    }
});
